package com.bank.user.service.client;

import com.bank.model.entity.Loan;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author Cejay1314
 * @version 1.0
 * @create 2023/3/31 22:53
 */

@FeignClient(name = "service-basic", url = "http://localhost:8081/basic/loan")
@Component
public interface LoanService {
    @GetMapping("/account")
    public List<Loan> queryAccount(@RequestParam String accountId);
    @GetMapping("/user")
    public List<Loan> queryUser(@RequestParam Long userId);
}
